import http from './http';

export const roles = () => http.get("/role");

export const addRole = (params) => http.post("/role", params);

export const delRole = (id) => http.delete(`/role/${id}`);

export const roleInfo = (id) => http.get(`/role/${id}`);

export const editRole = (id, params) => http.put(`/role/${id}`, params);

export const promocode = (params) => http.get('/promoCode', { params });

export const addPromocode = (params) => http.post('/promoCode', params);

export const generatorPromocode = (params) => http.post('/promoCode/generator', params);

export const mpWechatMessage = (params) => http.get('/mpWechatMessageReply', { params });

export const messageType = () => http.get('/mpWechatMessageReply/create');

export const addAutoReply = (params) => http.post('/mpWechatMessageReply', params);

export const messageInfo = (id) => http.get(`/mpWechatMessageReply/${id}`);

export const editAutoReply = (id, params) => http.put(`/mpWechatMessageReply/${id}`, params);

export const delAutoReply = (id) => http.delete(`/mpWechatMessageReply/${id}`);
